var selectAllState = 0;
function selectAll(formName){
	var cbTotal = document[formName].elements.length;
	for (var i=0;i<cbTotal;i++) {
		if ((document[formName].elements[i].name != 'selAction') && (!document[formName].elements[i].disabled)
		&& (document[formName].elements[i].type == 'checkbox'))
		{
			if (selectAllState == 0){
			    document[formName].elements[i].checked = true;
			}
			else{
				document[formName].elements[i].checked = false;
			}
		}
	}
	if (selectAllState == 0){
		selectAllState = 1;
		document.getElementById('A').style.display="none";
		document.getElementById('B').style.display="block";
	}
	else{
		selectAllState = 0;
		document.getElementById('A').style.display="block";
		document.getElementById('B').style.display="none";
	}
}
